﻿using System.Linq;
using www.Core.Contract.DataContract;
using www.Data.DAO;
using www.Models;

namespace www.Data.BO
{
    public class PhotoReBO
    {
        #region value
        private readonly PhotoRefDAO _photoRefDao = new PhotoRefDAO();
        #endregion

        #region Hàm lấy dữ liệu

        public IQueryable<RelaxPhotoDataContract> GetPhotoDataContracts()
        {
            return _photoRefDao.GetPhotoDataContracts();
        }

        public IQueryable<RelaxPhotoDataContract> GetPhotoDataContract()
        {
            return _photoRefDao.GetPhotoDataContract();
        }

        #endregion

        #region Hàm Add
        public void Add(PHOTO_REF photoRef)
        {
            _photoRefDao.Add(photoRef);
        }

        #endregion

        #region Hàm Update
        public void Update(PHOTO_REF photoRef)
        {
            _photoRefDao.Update(photoRef);
        }
        public void UpdateView(long id)
        {
            _photoRefDao.UpdateView(id);
        }
        #endregion

        #region Hàm Delete
        public void Delete(int iId)
        {
            _photoRefDao.Delete(iId);
        }
        #endregion

    }
}